/*
 * TextoArea.java
 *
 * Created on 25 de marzo de 2008, 16:25
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package mvc.wiew;

import javax.swing.JTextArea;

/**
 *
 * @author notebook
 */
public class TextoArea extends Caja{
    
    /** Creates a new instance of TextoArea */
    public TextoArea() {
        comp= new JTextArea();
        setSize(w0, h1);
        comp.setSize(w0-3*espesor-w1, h1-2*espesor);
        comp.setLocation(w1+2*espesor,espesor);
        comp.setVisible(true);
        add(comp);
   }

   public void set(String s) {
        ((JTextArea)comp).setText(s);
    }

    public String get() {
        return ((JTextArea)comp).getText();
    }
    
    public String toString(){
        return super.toString()+"TextoArea "+getName();
    }
    public static Caja creo(String s){
        Caja c = new TextoArea();
        c.setRotulo(s);
        c.setName(s);
        return c;
    }

}
